#include "config.h"


namespace evm { namespace messaging {

void register_opts(ConfigOptsPtr conf) {
    /* ========== messaging driver options ========== */
    conf->register_opt<string>("rpc_backend", "redis",
                               "The messaging driver to use, defaults to 'redis'.");

    // Redis driver options
    conf->register_opt<string>("rpc_redis_address", "127.0.0.1:6379",
                               "The redis server address used for messaging, defaults to '127.0.0.1:6379'");

    // Other drivers options ...

    conf->register_opt<int>("rpc_response_timeout", 2, "Seconds to wait for a response from a call");

    /* ========== messaging executor options ========== */
    conf->register_opt<string>("rpc_executor", "threadpool",
                               "The messaging execution mode, defaults to 'threadpool'");

    conf->register_opt<int>("rpc_pool_size", 8,
                            "The thread pool size for messaging executor, defaults to 8");

    /* ========== messaging notifier driver options ========== */
    conf->register_opt<Json>("rpc_notifier_driver", {"messaging"},
                             "The notifier driver list, defaults to ['messaging']");

    conf->register_opt<Json>("rpc_notifier_topics", {"notifications"},
                             "The notifier topics list, defaults to ['notifications']");
}

}}
